package com.hilon.segment.jpa.service.impl;

import com.hilon.segment.jpa.entity.Department;
import com.hilon.segment.jpa.repository.DepartmentRepository;
import com.hilon.segment.jpa.service.DepartmentService;
import com.hilon.base.service.EntityHandle;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Transactional(rollbackFor = Exception.class)
@Service
public class DepartmentServiceImpl extends EntityHandle<Department> implements DepartmentService {
    private final DepartmentRepository departmentRepository;

    public DepartmentServiceImpl(DepartmentRepository departmentRepository) {
        this.departmentRepository = departmentRepository;
        super.buildCurRepository(departmentRepository);
    }
}
